#include "numbered.h"

#define SPEAKER_PIN 8

const uint32_t notes[] = {
  ND | 4, ND | 8, ND3 | 8, ND5 | 8, ND6 | 8, N1 | 8, ND6 | 8,
  N2 | 4 | PERSIST_3, N2 | 8, N1 | 8,
  ND | 8, N1 | 8, N2 | 8, N3 | 8, N3 | 8, N2 | 8, N2 | 8, N1 | 16, ND6 | 16,
  ND6 | 8, ND6 | 8, ND6 | 4 | PERSIST_3,
  ND | 4, ND | 8, ND3 | 8, ND5 | 4, ND6 | 8, N1 | 8,
  N2 | 4, N2 | 4, N2 | 4, N2 | 8, N1 | 8,
  ND | 8, N2 | 8, N2 | 8, N3 | 8, N3 | 8, N2 | 8, N2 | 8, N1 | 16, ND6 | 16,
  ND6 | 8, ND6 | 8, ND6 | 4 | PERSIST_3,

  ND | 4, ND | 8, ND3 | 8, ND5 | 8, ND6 | 8, N1 | 8, ND6 | 8,
  N2 | 4 | PERSIST_3, N2 | 8, N1 | 8,
  ND | 8, N1 | 8, N2 | 8, N3 | 8, N3 | 8, N2 | 8, N2 | 8, N1 | 16, ND6 | 16,
  ND6 | 8, ND6 | 8, ND6 | 4 | PERSIST_3,
  ND | 4, ND | 8, ND3 | 8, ND5 | 4, ND6 | 8, N1 | 8,
  N2 | 4, N2 | 4, N2 | 4, N2 | 8, N1 | 8,
  ND | 8, N2 | 8, N2 | 8, N3 | 8, N3 | 8, N2 | 8, N2 | 8, N1 | 16, ND6 | 16,
  ND6 | 1,

  ND | 4, ND | 8, N1 | 8, N1 | 4, N2 | 8, N3 | 8,
  N5 | 8, N5 | 8, N5 | 8, N3 | 8, N5 | 8, N5 | 16, N6 | 16, N6 | 8, N5 | 8,
  N6 | 8, N6 | 8, N6 | 8, N5 | 8, N3 | 4, N5 | 8, N6 | 8,
  NG1 | 8, NG1 | 8, NG1 | 8, NG1 | 8, NG1 | 8, N6 | 8, N6 | 8, NG1 | 8,
  N6 | 8, N6 | 8, N6 | 8, N5 | 8, N3 | 4, N5 | 8, N3 | 8,
  N2 | 8, N2 | 8, N2 | 8, N1 | 8, ND6 | 4, N1 | 8, N2 | 8,
  N2 | 4, N2 | 8, N3 | 8, N5 | 8, N6 | 8, N6 | 8, N5 | 8,
  N3 | 8, N3 | 8, N3 | 2, N1 | 8, N2 | 8,

  N5 | 8, N5 | 8, N5 | 8, N3 | 8, N5 | 8, N5 | 16, N6 | 16, N6 | 8, N5 | 8,
  N6 | 8, N6 | 8, N6 | 8, N5 | 8, N3 | 4, N5 | 8, N6 | 8,
  NG1 | 8, NG1 | 8, NG1 | 8, NG1 | 8, NG1 | 8, N6 | 8, N6 | 8, NG1 | 8,
  N6 | 8, N6 | 8, N6 | 8, N5 | 8, N3 | 4, N5 | 8, N3 | 8,
  N2 | 8, N2 | 8, N2 | 8, N1 | 8, ND6 | 4, N1 | 8, N2 | 8,
  N2 | 4, N2 | 8, N3 | 8, N2 | 4, N1 | 8, ND6 | 8, ND6 | 1
};
NumberedMusicalNotation NMN(75, 4, SPEAKER_PIN);
int numTones = sizeof(notes) / sizeof(uint32_t);

void setup() {
  // put your setup code here, to run once:
  NMN.init();
}

void loop() {
  // put your main code here, to run repeatedly:
  NMN.play(notes, numTones);
}